const apiRoot = {
  dev: 'http://ng.learnerhub.net/v1',
  test: 'http://tapi.learnerhub.net/v1',
  prod: 'https://api.learnerhub.net/v1',
};

const apiRootCN = {
  dev: '本地版',
  test: '测试版',
  prod: '线上版',
};

const FULL_HOST = {
  dev: 'development',
  test: 'test',
  prod: 'production',
};

const localApi = 'test'; // 这个参数提供本地运行时访问哪个接口
const HOST = process.env.NODE_ENV === 'development' ? localApi : process.env.HOST;

export const env = {
  val: FULL_HOST[HOST],
  cn: apiRootCN[HOST],
  version: '20201221 v1.1',
};

export default {
  sq: apiRoot[HOST],
};
